package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PropertyFeedbackMapper;
import com.ruoyi.system.domain.PropertyFeedback;
import com.ruoyi.system.service.IPropertyFeedbackService;

/**
 * 留言反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-27
 */
@Service
public class PropertyFeedbackServiceImpl implements IPropertyFeedbackService 
{
    @Autowired
    private PropertyFeedbackMapper propertyFeedbackMapper;

    /**
     * 查询留言反馈
     * 
     * @param feedbackId 留言反馈主键
     * @return 留言反馈
     */
    @Override
    public PropertyFeedback selectPropertyFeedbackByFeedbackId(Long feedbackId)
    {
        return propertyFeedbackMapper.selectPropertyFeedbackByFeedbackId(feedbackId);
    }

    /**
     * 查询留言反馈列表
     * 
     * @param propertyFeedback 留言反馈
     * @return 留言反馈
     */
    @Override
    public List<PropertyFeedback> selectPropertyFeedbackList(PropertyFeedback propertyFeedback)
    {
        return propertyFeedbackMapper.selectPropertyFeedbackList(propertyFeedback);
    }

    /**
     * 新增留言反馈
     * 
     * @param propertyFeedback 留言反馈
     * @return 结果
     */
    @Override
    public int insertPropertyFeedback(PropertyFeedback propertyFeedback)
    {
        propertyFeedback.setCreateTime(DateUtils.getNowDate());
        return propertyFeedbackMapper.insertPropertyFeedback(propertyFeedback);
    }

    /**
     * 修改留言反馈
     * 
     * @param propertyFeedback 留言反馈
     * @return 结果
     */
    @Override
    public int updatePropertyFeedback(PropertyFeedback propertyFeedback)
    {
        return propertyFeedbackMapper.updatePropertyFeedback(propertyFeedback);
    }

    /**
     * 批量删除留言反馈
     * 
     * @param feedbackIds 需要删除的留言反馈主键
     * @return 结果
     */
    @Override
    public int deletePropertyFeedbackByFeedbackIds(Long[] feedbackIds)
    {
        return propertyFeedbackMapper.deletePropertyFeedbackByFeedbackIds(feedbackIds);
    }

    /**
     * 删除留言反馈信息
     * 
     * @param feedbackId 留言反馈主键
     * @return 结果
     */
    @Override
    public int deletePropertyFeedbackByFeedbackId(Long feedbackId)
    {
        return propertyFeedbackMapper.deletePropertyFeedbackByFeedbackId(feedbackId);
    }
}
